function putImage(jsonImage, remarks) {

   var myHeaders = new Headers();
   myHeaders.append("Content-Type", "application/json");
   myHeaders.append("Accept", "*/*");
   myHeaders.append("Host", "182.92.6.98:8090");
   myHeaders.append("Connection", "keep-alive");

   var url = jsonImage.data;

   var raw = JSON.stringify({
      "imgName": "test",
      "imgUrl": String(url),
      "imgRemarks": String(remarks.value)
   });

   var requestOptions = {
      method: 'PUT',
      headers: myHeaders,
      body: raw,
      redirect: 'follow'
   };

   fetch("http://182.92.6.98:8090/img/addImg", requestOptions)
      .then(response => response.text())
      .then(result => {
         successSubmit(result);
         refresh();
      })
      .catch(error => alert(error));
 }

 function successSubmit(result)
 {
   alert(result);
   document.getElementById('imageUpload').value = null;
   document.getElementById('nameInput').value = "";
 }